//
//  WaybillModel.h
//  express
//
//  Created by dd on 12/7/14.
//  Copyright (c) 2014 yunqi. All rights reserved.
//

#import "BaseModel.h"
#import "WaybillStatus.h"
#import "WaybillCustomer.h"
#import "Courier.h"

// 待收单
#define WAYBILL_STATUS_INIT                     0
// 收单中
#define WAYBILL_STATUS_RECEIVING                1
// 已收单(已收件)
#define WAYBILL_STATUS_RECEIVE_SUCCESS          2
// 运输中(未派件)
#define WAYBILL_STATUS_IN_TRANSIT               3
// 未签收(派件中)(已派件)
#define WAYBILL_STATUS_DELIVERING               4
// 已签收
#define WAYBILL_STATUS_DELIVER_SUCCESS          5
// 被取消
#define WAYBILL_STATUS_CANCEL                   -1
// 收单失败
#define WAYBILL_STATUS_RECEIVE_FAIL             -2
// 派送失败（滞留件）
#define WAYBILL_STATUS_DELIVER_FAIL             -3
// 快件丢失
#define WAYBILL_STATUS_LOST                     -4
// 其他失败
#define WAYBILL_STATUS_FAIL                     -5


@interface Waybill : BaseModel
{
    WaybillCustomer *_toCustomer;
    WaybillCustomer *_toCustomerAgent;
    WaybillCustomer *_fromCustomer;
    Courier *_receiveCourier;
    Courier *_deliverCourier;
}

- (NSString *)fromAndToLocation;
- (NSArray *)statusList;
- (NSString *)statusName;
- (WaybillCustomer *)toCustomer;
- (NSString *)toUserId;
- (WaybillCustomer *)toCustomerAgent;
- (NSString *)toUserAgentId;
- (WaybillCustomer *)fromCustomer;
- (NSString *)fromUserId;
- (Courier *)receiveCourier;
- (NSString *)receiveCourierId;
- (Courier *)deliverCourier;
- (NSString *)deliverCourierId;
- (NSString *)status;
- (NSString *)content;
- (NSString *)comment;
- (NSString *)deliverBonus;
- (NSString *)deliverCharge;
- (NSString *)deliverRate;
- (NSString *)deliverUrgentTime;
- (NSString *)deliverConfirmUser;
- (NSString *)receiveBonus;
- (NSString *)receiveCharge;
- (NSString *)receiveRate;
- (NSString *)receiveUrgentTime;
- (NSString *)receiveConfirmUser;
- (NSString *)orgName;
- (NSInteger)rateType;
- (NSInteger)receivePayedMoney;
- (NSInteger)deliverPayedMoney;
@end
